import 'package:gameplay_flutter/generated/json/base/json_convert_content.dart';
import 'package:gameplay_flutter/lib_basemodel/discover/play_auth_entity.dart';

PlayAuthEntity $PlayAuthEntityFromJson(Map<String, dynamic> json) {
  final PlayAuthEntity playAuthEntity = PlayAuthEntity();
  final String? creationTime = jsonConvert.convert<String>(json['creationTime']);
  if (creationTime != null) {
    playAuthEntity.creationTime = creationTime;
  }
  final String? status = jsonConvert.convert<String>(json['status']);
  if (status != null) {
    playAuthEntity.status = status;
  }
  final String? specification = jsonConvert.convert<String>(json['specification']);
  if (specification != null) {
    playAuthEntity.specification = specification;
  }
  final dynamic complexity = json['complexity'];
  if (complexity != null) {
    playAuthEntity.complexity = complexity;
  }
  final String? narrowBandType = jsonConvert.convert<String>(json['narrowBandType']);
  if (narrowBandType != null) {
    playAuthEntity.narrowBandType = narrowBandType;
  }
  final int? height = jsonConvert.convert<int>(json['height']);
  if (height != null) {
    playAuthEntity.height = height;
  }
  final String? bitrate = jsonConvert.convert<String>(json['bitrate']);
  if (bitrate != null) {
    playAuthEntity.bitrate = bitrate;
  }
  final String? modificationTime = jsonConvert.convert<String>(json['modificationTime']);
  if (modificationTime != null) {
    playAuthEntity.modificationTime = modificationTime;
  }
  final dynamic watermarkId = json['watermarkId'];
  if (watermarkId != null) {
    playAuthEntity.watermarkId = watermarkId;
  }
  final int? encrypt = jsonConvert.convert<int>(json['encrypt']);
  if (encrypt != null) {
    playAuthEntity.encrypt = encrypt;
  }
  final String? definition = jsonConvert.convert<String>(json['definition']);
  if (definition != null) {
    playAuthEntity.definition = definition;
  }
  final dynamic rand = json['rand'];
  if (rand != null) {
    playAuthEntity.rand = rand;
  }
  final dynamic encryptType = json['encryptType'];
  if (encryptType != null) {
    playAuthEntity.encryptType = encryptType;
  }
  final String? preprocessStatus = jsonConvert.convert<String>(json['preprocessStatus']);
  if (preprocessStatus != null) {
    playAuthEntity.preprocessStatus = preprocessStatus;
  }
  final String? streamType = jsonConvert.convert<String>(json['streamType']);
  if (streamType != null) {
    playAuthEntity.streamType = streamType;
  }
  final String? jobId = jsonConvert.convert<String>(json['jobId']);
  if (jobId != null) {
    playAuthEntity.jobId = jobId;
  }
  final dynamic plaintext = json['plaintext'];
  if (plaintext != null) {
    playAuthEntity.plaintext = plaintext;
  }
  final int? size = jsonConvert.convert<int>(json['size']);
  if (size != null) {
    playAuthEntity.size = size;
  }
  final int? width = jsonConvert.convert<int>(json['width']);
  if (width != null) {
    playAuthEntity.width = width;
  }
  final String? fps = jsonConvert.convert<String>(json['fps']);
  if (fps != null) {
    playAuthEntity.fps = fps;
  }
  final String? duration = jsonConvert.convert<String>(json['duration']);
  if (duration != null) {
    playAuthEntity.duration = duration;
  }
  final String? playURL = jsonConvert.convert<String>(json['playURL']);
  if (playURL != null) {
    playAuthEntity.playURL = playURL;
  }
  final String? format = jsonConvert.convert<String>(json['format']);
  if (format != null) {
    playAuthEntity.format = format;
  }
  final dynamic bitDepth = json['bitDepth'];
  if (bitDepth != null) {
    playAuthEntity.bitDepth = bitDepth;
  }
  final dynamic hdrtype = json['hdrtype'];
  if (hdrtype != null) {
    playAuthEntity.hdrtype = hdrtype;
  }
  return playAuthEntity;
}

Map<String, dynamic> $PlayAuthEntityToJson(PlayAuthEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['creationTime'] = entity.creationTime;
  data['status'] = entity.status;
  data['specification'] = entity.specification;
  data['complexity'] = entity.complexity;
  data['narrowBandType'] = entity.narrowBandType;
  data['height'] = entity.height;
  data['bitrate'] = entity.bitrate;
  data['modificationTime'] = entity.modificationTime;
  data['watermarkId'] = entity.watermarkId;
  data['encrypt'] = entity.encrypt;
  data['definition'] = entity.definition;
  data['rand'] = entity.rand;
  data['encryptType'] = entity.encryptType;
  data['preprocessStatus'] = entity.preprocessStatus;
  data['streamType'] = entity.streamType;
  data['jobId'] = entity.jobId;
  data['plaintext'] = entity.plaintext;
  data['size'] = entity.size;
  data['width'] = entity.width;
  data['fps'] = entity.fps;
  data['duration'] = entity.duration;
  data['playURL'] = entity.playURL;
  data['format'] = entity.format;
  data['bitDepth'] = entity.bitDepth;
  data['hdrtype'] = entity.hdrtype;
  return data;
}

extension PlayAuthEntityExtension on PlayAuthEntity {
  PlayAuthEntity copyWith({
    String? creationTime,
    String? status,
    String? specification,
    dynamic complexity,
    String? narrowBandType,
    int? height,
    String? bitrate,
    String? modificationTime,
    dynamic watermarkId,
    int? encrypt,
    String? definition,
    dynamic rand,
    dynamic encryptType,
    String? preprocessStatus,
    String? streamType,
    String? jobId,
    dynamic plaintext,
    int? size,
    int? width,
    String? fps,
    String? duration,
    String? playURL,
    String? format,
    dynamic bitDepth,
    dynamic hdrtype,
  }) {
    return PlayAuthEntity()
      ..creationTime = creationTime ?? this.creationTime
      ..status = status ?? this.status
      ..specification = specification ?? this.specification
      ..complexity = complexity ?? this.complexity
      ..narrowBandType = narrowBandType ?? this.narrowBandType
      ..height = height ?? this.height
      ..bitrate = bitrate ?? this.bitrate
      ..modificationTime = modificationTime ?? this.modificationTime
      ..watermarkId = watermarkId ?? this.watermarkId
      ..encrypt = encrypt ?? this.encrypt
      ..definition = definition ?? this.definition
      ..rand = rand ?? this.rand
      ..encryptType = encryptType ?? this.encryptType
      ..preprocessStatus = preprocessStatus ?? this.preprocessStatus
      ..streamType = streamType ?? this.streamType
      ..jobId = jobId ?? this.jobId
      ..plaintext = plaintext ?? this.plaintext
      ..size = size ?? this.size
      ..width = width ?? this.width
      ..fps = fps ?? this.fps
      ..duration = duration ?? this.duration
      ..playURL = playURL ?? this.playURL
      ..format = format ?? this.format
      ..bitDepth = bitDepth ?? this.bitDepth
      ..hdrtype = hdrtype ?? this.hdrtype;
  }
}